home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
prog_gen
/
xv_pc16a.zip
/
TABKEYS.INC
< prev
next >
Wrap
Text File
|
1994-04-20
|
1KB
|
48 lines
{
Object selection using the Tab key for the XView-PC interface
By Antonio Carlos Moreirao de Queiroz - acmq@coe.ufrj.br
Version 1.0 - 10/04/94
This procedure moves the mouse cursor to the next object in the active
window when the Tab key is pressed, using the "interposer".
The Shift-Tab key moves the cursor to the top of the next window.
The Return key is equivalent to the mouse left button.
To install:
Include this file, and insert after "xv_init": interposer:=TabKeys;
The program must use the units Mickey and XView.
}
{$I extkeys.inc}
{$F+}
PROCEDURE TabKeys;
VAR
pto,ptw:Xv_opaque;
BEGIN
ptw:=active_w; pto:=nil;
IF ie_code=kTab THEN BEGIN
IF active_o<>nil THEN pto:=active_o^.next
ELSE pto:=ptw^.next
END
ELSE IF ie_code=kShiftTab THEN ptw:=ptw^.under
ELSE IF ie_code=kCr THEN BEGIN
ie_code:=MS_LEFT;
Exit
END
ELSE Exit;
IF pto=nil THEN BEGIN
mousex:=ptw^.x+ptw^.dx div 2;
mousey:=ptw^.y+mrgy div 2;
open_window(ptw);
END
ELSE BEGIN
mousex:=ptw^.x+mrgx+pto^.x+pto^.dx div 2;
mousey:=ptw^.y+mrgy+pto^.y+pto^.dy div 2;
END;
mouse_move(mousex,mousey);
END;
{$F-}